// 导入组件
import DataVAmap from './data-v-amap';
import DataVBtn from './data-v-btn';
import DataVChart from './data-v-chart';
import DataVCircleChart from './data-v-circle-chart';
import DataVBarChart from './data-v-bar-chart';
import DataVAreaChart from './data-v-area-chart';
import DataVDigit from './data-v-digit';
import DataVOption from './data-v-option';
import DataVPanel from './data-v-panel';
import DataVRank from './data-v-rank';
import DataVSelect from './data-v-select';
import DataVDBlock from './data-v-dblock';
import DataVClock from './data-v-clock';
import DataVHead from './data-v-head';
import DataVLoginBox from './data-v-login-box';
import DataVTab from './data-v-tab';
import DataVScroll from './data-v-scroll';
import DataVTimeline from './data-v-timeline';
import DataVDoubleDealer from './data-v-doubleDealer';
import DataVCountDown from './data-v-count-down';
import DataVPie from './data-v-pie';
import DataVRadar from './data-v-radar';
import DataVCircle from './data-v-circle';
import DataVDroplet from "./data-v-droplet";
import DataVRing from "./data-v-ring";
import DataVPicBar from "./data-v-pic-bar/index";
import DataVAreaPoly from "./data-v-areaPoly";
import DataVSummary from "./data-v-summary";
import DataVMultiBar from "./data-v-multiBar";
import DataVProgress from "./data-v-progress";
import DataVSingleBar from "./data-v-singleBar";
import DataVRankList from "./data-v-rankList";
import DataVPercentage from "./data-v-percentage";
import DataVAnnularBar from "./data-v-annularBar";
import DataVStackBar from './data-v-stackBar';
import DataVAnnularMutiBar from './data-v-annularMutiBar';
import DataVPercentnum from "./data-v-percentnum";
import DataVMutiPie from './data-v-MutiPie';
import DataVTable from "./data-v-table";
import DataVTableItem from './data-v-tableItem';
import DataVSummarySquare from "./data-v-summary-square";
import DataVSummaryRect from "./data-v-summary-rect";
import DataVSummaryGradient from "./data-v-summary-gradient";
import DataVCustomGauge from "./data-v-customGauge";
import DataVNews from "./data-v-news";
import DataVLine from './data-v-line';
import DataVBubble from "./data-v-bubble";
import DataVDigitPaging from "./data-v-digit-paging";
import DataVFunnel from './data-v-funnel';
import DataVLoading from "./data-v-loading";
import DataVTitle from './data-v-title';
import DataVMenu from './data-v-menu';
import DataVDigitCard from './data-v-digitCard';
import DataVCardProgress from './data-v-cardProgress';
import DataVPlayBar from './data-v-play-bar';
import DataVDigitPanel from './data-v-digitPanel';
import DataVCusBar from './data-v-cus-bar';
import DataVDropdown from './data-v-dropdown';
import DataVSegment from './data-v-segment';
import DataVSubPanel from './data-v-subPanel';

// 导入指令
import directives from "./directives";
import DataVTitlePanel from './data-v-title-panel';



// 组件列表
const components = [
  DataVAmap,
  DataVBtn,
  DataVChart,
  DataVCircleChart,
  DataVBarChart,
  DataVAreaChart,
  DataVDigit,
  DataVOption,
  DataVPanel,
  DataVRank,
  DataVSelect,
  DataVDBlock,
  DataVClock,
  DataVHead,
  DataVClock,
  DataVLoginBox,
  DataVTab,
  DataVScroll,
  DataVTimeline,
  DataVDoubleDealer,
  DataVCountDown,
  DataVPie,
  DataVRadar,
  DataVCircle,
  DataVDroplet,
  DataVRing,
  DataVPicBar,
  DataVSummary,
  DataVAreaPoly,
  DataVMultiBar,
  DataVProgress,
  DataVSingleBar,
  DataVRankList,
  DataVPercentage,
  // DataVAnnularBar,
  DataVStackBar,
  DataVAnnularMutiBar,
  DataVAnnularBar,
  DataVPercentnum,
  DataVMutiPie,
  DataVTable,
  DataVTableItem,
  DataVSummarySquare,
  DataVSummaryRect,
  DataVSummaryGradient,
  DataVCustomGauge,
  DataVNews,
  DataVLine,
  DataVBubble,
  DataVDigitPaging,
  DataVFunnel,
  DataVLoading,
  DataVTitle,
  DataVMenu,
  DataVDigitCard,
  DataVCardProgress,
  DataVPlayBar,
  DataVTitle,
  DataVMenu,
  DataVCardProgress,
  DataVDigitPanel,
  DataVCusBar,
  DataVTitlePanel,
  DataVDropdown,
  DataVSegment,
  DataVSubPanel
];

// 定义 install 方法，接收 Vue 作为参数。如果使用 use 注册插件，那么所有的组件都会被注册
const install = function (Vue) {
  // 判断是否安装
  if (install.installed) { return }
  // 遍历注册全局组件
  components.map(component => Vue.component(component.name, component));

  // 遍历注册全局指令
  Object.keys(directives).map(directiveName => {
    let directive = directives[directiveName];
    Vue.directive(directiveName, directive);
  });

}

// 判断是否是直接引入文件
if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue);
}

export default {
  // 导出的对象必须具有 install，才能被 Vue.use() 方法安装
  install,
  // 以下是具体的组件列表
  DataVAmap,
  DataVBtn,
  DataVChart,
  DataVCircleChart,
  DataVBarChart,
  DataVAreaChart,
  DataVDigit,
  DataVOption,
  DataVPanel,
  DataVRank,
  DataVSelect,
  DataVDBlock,
  DataVClock,
  DataVHead,
  DataVLoginBox,
  DataVTab,
  DataVScroll,
  DataVTimeline,
  DataVDoubleDealer,
  DataVCountDown,
  DataVPie,
  DataVRadar,
  DataVCircle,
  DataVDroplet,
  DataVRing,
  DataVPicBar,
  DataVSummary,
  DataVAreaPoly,
  DataVMultiBar,
  DataVProgress,
  DataVSingleBar,
  DataVRankList,
  DataVPercentage,
  // DataVAnnularBar,
  DataVStackBar,
  DataVAnnularMutiBar,
  DataVAnnularBar,
  DataVPercentnum,
  DataVMutiPie,
  DataVTable,
  DataVTableItem,
  DataVSummarySquare,
  DataVSummaryRect,
  DataVSummaryGradient,
  DataVCustomGauge,
  DataVNews,
  DataVLine,
  DataVBubble,
  DataVDigitPaging,
  DataVFunnel,
  DataVLoading,
  DataVTitle,
  DataVMenu,
  DataVDigitCard,
  DataVCardProgress,
  DataVPlayBar,
  DataVDigitPanel,
  DataVCusBar,
  DataVTitlePanel,
  DataVDropdown,
  DataVSegment,
  DataVSubPanel
}
